<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>pg_settings</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="SECT1">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="view-pg-rules.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="catalogs.html">快退</a></td><td width="60%" align="center" valign="bottom">章43. 系统表</td><td width="10%" align="right" valign="top"><a href="catalogs.html">快进</a></td><td width="10%" align="right" valign="top"><a href="view-pg-shadow.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="SECT1"><h1 class="SECT1"><a name="VIEW-PG-SETTINGS">43.44. <tt class="STRUCTNAME">pg_settings</tt></a></h1><a name="AEN66092"></a>
<p><tt class="STRUCTNAME">pg_settings</tt> 提供了对服务器运行时参数的访问。它实际上是 <tt class="COMMAND">SHOW</tt> 和 <tt class="COMMAND">SET</tt> 命令的另外一个接口。它还提供一些用 <tt class="COMMAND">SHOW</tt> 不能直接获取的参数的访问，比如最大和最小值。</p>
<div class="TABLE"><a name="AEN66099"></a>
<p><b>表43-44. <tt class="STRUCTNAME">pg_settings</tt> 字段</b></p>
<table border="1" class="CALSTABLE"><col><col><col><col>
<thead>
<tr><th>名字</th><th>类型</th><th>描述</th><td>&nbsp;</td></tr>
</thead>
<tbody>
<tr><td><tt class="STRUCTFIELD">name</tt></td><td><tt class="TYPE">text</tt></td><td>运行时配置参数名</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">setting</tt></td><td><tt class="TYPE">text</tt></td><td>参数的当前值</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">unit</tt></td><td><tt class="TYPE">text</tt></td><td>参数的隐含单元</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">category</tt></td><td><tt class="TYPE">text</tt></td><td>参数的逻辑组</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">short_desc</tt></td><td><tt class="TYPE">text</tt></td><td>参数的一个简短的描述</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">extra_desc</tt></td><td><tt class="TYPE">text</tt></td><td>有关参数的额外的，更详细的信息</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">context</tt></td><td><tt class="TYPE">text</tt></td><td>设置这个参数的值要求的环境</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">vartype</tt></td><td><tt class="TYPE">text</tt></td><td>参数类型(<tt class="LITERAL">bool</tt>, <tt class="LITERAL">integer</tt>, <tt class="LITERAL">real</tt>, <tt class="LITERAL">string</tt>)</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">source</tt></td><td><tt class="TYPE">text</tt></td><td>当前参数值的来源</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">min_val</tt></td><td><tt class="TYPE">text</tt></td><td>该参数允许的最小值(非数字值为 NULL)</td><td>&nbsp;</td></tr>
<tr><td><tt class="STRUCTFIELD">max_val</tt></td><td><tt class="TYPE">text</tt></td><td>这个参数允许的最大的数值(非数字值为 NULL)</td><td>&nbsp;</td></tr>
</tbody>
</table>
</div>
<p>不能对 <tt class="STRUCTNAME">pg_settings</tt> 视图进行插入或者删除，但是可以更新。对 <tt class="STRUCTNAME">pg_settings</tt> 中的一行进行 <tt class="COMMAND">UPDATE</tt> 等效于在该命名参数上执行 <a href="sql-set.html"><i>SET</i></a> 命令。这个修改值影响当前会话使用的数值。如果在一个最后退出的事务中发出了 <tt class="COMMAND">UPDATE</tt> 命令，那么 <tt class="COMMAND">UPDATE</tt> 命令的效果将在事务回滚之后消失。一旦包围它的事务提交，这个效果将固化，直到会话结束，除非由其它的 <tt class="COMMAND">UPDATE</tt> 或 <tt class="COMMAND">SET</tt> 命令覆盖。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="view-pg-rules.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="view-pg-shadow.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top"><tt class="STRUCTNAME">pg_rules</tt></td><td width="34%" align="center" valign="top"><a href="catalogs.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top"><tt class="STRUCTNAME">pg_shadow</tt></td></tr>
</table>
</div>
</body></html>